using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;
using Fcdbas.Core;
using Fcdbas.Core.Configuration;
using Fcdbas.Core.DataAccess;

namespace Fcdbas.Biz
{
    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("approval_profile", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class approval_profile : Entity<approval_profile>, Iapproval_profile
    {
        #region profile_id
        private String _profile_id;
        [DisplayName("审核模板")]
        [Description("ApprovalProfile.approval_profile.ProfileId")]
        [DataObjectField(false, false, false, 20)]
        [BindColumn(1, "profile_id", "", null, "varchar(20)", 0, 0, false)]
        public virtual String profile_id
        {
            get { return _profile_id; }
            set { if (OnPropertyChanging(__.profile_id, value)) { _profile_id = value; OnPropertyChanged(__.profile_id); } }
        }
        #endregion

        #region description
        private String _description;
        [DisplayName("描述描述")]
        [Description("ApprovalProfile.approval_profile.Description")]
        [DataObjectField(false, false, false, 100)]
        [BindColumn(2, "description", "", null, "varchar(100)", 0, 0, false)]
        public virtual String description
        {
            get { return _description; }
            set { if (OnPropertyChanging(__.description, value)) { _description = value; OnPropertyChanged(__.description); } }
        }
        #endregion


        #region _objid
        private String _objid;
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(9, "objid", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objid
        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }
        #endregion

        #region _objversion
        private String _objversion;
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(10, "objversion", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objversion
        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.profile_id: return _profile_id;
                    case __.description: return _description;

                    case __.objid: return _objid;
                    case __.objversion: return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.profile_id:
                        if (value != null)
                            _profile_id = Convert.ToString(value);
                        else
                            _profile_id = null;
                        break;
                    case __.description:
                        if (value != null)
                            _description = Convert.ToString(value);
                        else
                            _description = null;
                        break;


                    case __.objid:
                        if (value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                        break;
                    case __.objversion:
                        if (value != null)
                            _objversion = Convert.ToString(value);
                        else
                            _objversion = null;
                        break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        public class _
        {
            public static readonly Field profile_id = FindByName(__.profile_id);
            public static readonly Field description = FindByName(__.description);

            public static readonly Field objid = FindByName(__.objid);
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }
        class __
        {
            public const String profile_id = "profile_id";
            public const String description = "description";

            public const String objid = "objid";
            public const String objversion = "objversion";
        }
        #endregion
    }
    public partial interface Iapproval_profile
    {
        #region 属性
        String profile_id { get; set; }
        String description { get; set; }

        String objid { get; set; }
        String objversion { get; set; }
        #endregion

        Object this[String name] { get; set; }
    }

    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("approval_routing", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class approval_routing : Entity<approval_routing>, Iapproval_routing
    {
        #region key_name
        private String _key_name;
        [DisplayName("对象")]
        [Description("ApprovalRouting.approval_routing.KeyName")]
        [DataObjectField(false, false, false, 40)]
        [BindColumn(1, "key_name", "", null, "varchar(40)", 0, 0, false)]
        public virtual String key_name
        {
            get { return _key_name; }
            set { if (OnPropertyChanging(__.key_name, value)) { _key_name = value; OnPropertyChanged(__.key_name); } }
        }
        #endregion

        #region key_ref
        private String _key_ref;
        [DisplayName("对象值")]
        [Description("ApprovalRouting.approval_routing.KeyRef")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(2, "key_ref", "", null, "varchar(50)", 0, 0, false)]
        public virtual String key_ref
        {
            get { return _key_ref; }
            set { if (OnPropertyChanging(__.key_ref, value)) { _key_ref = value; OnPropertyChanged(__.key_ref); } }
        }
        #endregion

        #region step_no
        private Decimal? _step_no;
        [DisplayName("步骤号")]
        [Description("ApprovalRouting.approval_routing.StepNo")]
        [DataObjectField(false, false, false, 3)]
        [BindColumn(3, "step_no", "", null, "decimal(3)", 3, 0, false)]
        public virtual Decimal? step_no
        {
            get { return _step_no; }
            set { if (OnPropertyChanging(__.step_no, value)) { _step_no = value; OnPropertyChanged(__.step_no); } }
        }
        #endregion

        #region description
        private String _description;
        [DisplayName("步骤描述")]
        [Description("ApprovalRouting.approval_routing.Description")]
        [DataObjectField(false, false, false, 100)]
        [BindColumn(4, "description", "", null, "varchar(100)", 0, 0, false)]
        public virtual String description
        {
            get { return _description; }
            set { if (OnPropertyChanging(__.description, value)) { _description = value; OnPropertyChanged(__.description); } }
        }
        #endregion

        #region note
        private String _note;
        [DisplayName("备注")]
        [Description("ApprovalRouting.approval_routing.Note")]
        [DataObjectField(false, false, false, 2000)]
        [BindColumn(5, "note", "", null, "varchar(2000)", 0, 0, false)]
        public virtual String note
        {
            get { return _note; }
            set { if (OnPropertyChanging(__.note, value)) { _note = value; OnPropertyChanged(__.note); } }
        }
        #endregion

        #region group_id
        private String _group_id;
        [DisplayName("审核组")]
        [Description("ApprovalRouting.approval_routing.GroupId")]
        [DataObjectField(false, false, false, 20)]
        [BindColumn(6, "group_id", "", null, "varchar(20)", 0, 0, false)]
        public virtual String group_id
        {
            get { return _group_id; }
            set { if (OnPropertyChanging(__.group_id, value)) { _group_id = value; OnPropertyChanged(__.group_id); } }
        }
        #endregion

        #region person_id
        private String _person_id;
        [DisplayName("审核人")]
        [Description("ApprovalRouting.approval_routing.PersonId")]
        [DataObjectField(false, false, false, 40)]
        [BindColumn(7, "person_id", "", null, "varchar(40)", 0, 0, false)]
        public virtual String person_id
        {
            get { return _person_id; }
            set { if (OnPropertyChanging(__.person_id, value)) { _person_id = value; OnPropertyChanged(__.person_id); } }
        }
        #endregion

        #region approval_status
        private String _approval_status;
        [DisplayName("审核状态")]
        [Description("ApprovalRouting.approval_routing.ApprovalStatus")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(8, "approval_status", "", null, "varchar(50)", 0, 0, false)]
        public virtual String approval_status
        {
            get { return _approval_status; }
            set { if (OnPropertyChanging(__.approval_status, value)) { _approval_status = value; OnPropertyChanged(__.approval_status); } }
        }
        #endregion

        #region approval_status_db
        private String _approval_status_db;
        [DisplayName("审核状态")]
        [Description("ApprovalRouting.approval_routing.ApprovalStatusDb")]
        [DataObjectField(false, false, false, 20)]
        [BindColumn(9, "approval_status_db", "", null, "varchar(20)", 0, 0, false)]
        public virtual String approval_status_db
        {
            get { return _approval_status_db; }
            set { if (OnPropertyChanging(__.approval_status_db, value)) { _approval_status_db = value; OnPropertyChanged(__.approval_status_db); } }
        }
        #endregion

        #region security_checkpoint_req
        private String _security_checkpoint_req;
        [DisplayName("安全检查")]
        [Description("ApprovalRouting.approval_routing.SecurityCheckpointReq")]
        [DataObjectField(false, false, false, 5)]
        [BindColumn(10, "security_checkpoint_req", "", null, "varchar(5)", 0, 0, false)]
        public virtual String security_checkpoint_req
        {
            get { return _security_checkpoint_req; }
            set { if (OnPropertyChanging(__.security_checkpoint_req, value)) { _security_checkpoint_req = value; OnPropertyChanged(__.security_checkpoint_req); } }
        }
        #endregion

        #region approval_date
        private DateTime? _approval_date;
        [DisplayName("核准日期")]
        [Description("ApprovalRouting.approval_routing.ApprovalDate")]
        [DataObjectField(false, false, false, 0)]
        [BindColumn(11, "approval_date", "", null, "date", 0, 0, false)]
        public virtual DateTime? approval_date
        {
            get { return _approval_date; }
            set { if (OnPropertyChanging(__.approval_date, value)) { _approval_date = value; OnPropertyChanged(__.approval_date); } }
        }
        #endregion

        #region app_person_id
        private String _app_person_id;
        [DisplayName("核准人")]
        [Description("ApprovalRouting.approval_routing.AppPersonId")]
        [DataObjectField(false, false, false, 40)]
        [BindColumn(12, "app_person_id", "", null, "varchar(40)", 0, 0, false)]
        public virtual String app_person_id
        {
            get { return _app_person_id; }
            set { if (OnPropertyChanging(__.app_person_id, value)) { _app_person_id = value; OnPropertyChanged(__.app_person_id); } }
        }
        #endregion

        #region approval_note
        private String _approval_note;
        [DisplayName("核准备注")]
        [Description("ApprovalRouting.approval_routing.ApprovalNote")]
        [DataObjectField(false, false, false, 2000)]
        [BindColumn(13, "approval_note", "", null, "varchar(2000)", 0, 0, false)]
        public virtual String approval_note
        {
            get { return _approval_note; }
            set { if (OnPropertyChanging(__.approval_note, value)) { _approval_note = value; OnPropertyChanged(__.approval_note); } }
        }
        #endregion


        #region _objid
        private String _objid;
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(9, "objid", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objid
        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }
        #endregion

        #region _objversion
        private String _objversion;
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(10, "objversion", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objversion
        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.key_name: return _key_name;
                    case __.key_ref: return _key_ref;
                    case __.step_no: return _step_no;
                    case __.description: return _description;
                    case __.note: return _note;
                    case __.group_id: return _group_id;
                    case __.person_id: return _person_id;
                    case __.approval_status: return _approval_status;
                    case __.approval_status_db: return _approval_status_db;
                    case __.security_checkpoint_req: return _security_checkpoint_req;
                    case __.approval_date: return _approval_date;
                    case __.app_person_id: return _app_person_id;
                    case __.approval_note: return _approval_note;

                    case __.objid: return _objid;
                    case __.objversion: return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.key_name:
                        if (value != null)
                            _key_name = Convert.ToString(value);
                        else
                            _key_name = null;
                        break;
                    case __.key_ref:
                        if (value != null)
                            _key_ref = Convert.ToString(value);
                        else
                            _key_ref = null;
                        break;
                    case __.step_no:
                        if (value != null)
                            _step_no = Convert.ToDecimal(value);
                        else
                            _step_no = null;
                        break;
                    case __.description:
                        if (value != null)
                            _description = Convert.ToString(value);
                        else
                            _description = null;
                        break;
                    case __.note:
                        if (value != null)
                            _note = Convert.ToString(value);
                        else
                            _note = null;
                        break;
                    case __.group_id:
                        if (value != null)
                            _group_id = Convert.ToString(value);
                        else
                            _group_id = null;
                        break;
                    case __.person_id:
                        if (value != null)
                            _person_id = Convert.ToString(value);
                        else
                            _person_id = null;
                        break;
                    case __.approval_status:
                        if (value != null)
                            _approval_status = Convert.ToString(value);
                        else
                            _approval_status = null;
                        break;
                    case __.approval_status_db:
                        if (value != null)
                            _approval_status_db = Convert.ToString(value);
                        else
                            _approval_status_db = null;
                        break;
                    case __.security_checkpoint_req:
                        if (value != null)
                            _security_checkpoint_req = Convert.ToString(value);
                        else
                            _security_checkpoint_req = null;
                        break;
                    case __.approval_date:
                        if (value != null)
                            _approval_date = Convert.ToDateTime(value);
                        else
                            _approval_date = null;
                        break;
                    case __.app_person_id:
                        if (value != null)
                            _app_person_id = Convert.ToString(value);
                        else
                            _app_person_id = null;
                        break;
                    case __.approval_note:
                        if (value != null)
                            _approval_note = Convert.ToString(value);
                        else
                            _approval_note = null;
                        break;


                    case __.objid:
                        if (value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                        break;
                    case __.objversion:
                        if (value != null)
                            _objversion = Convert.ToString(value);
                        else
                            _objversion = null;
                        break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        public class _
        {
            public static readonly Field key_name = FindByName(__.key_name);
            public static readonly Field key_ref = FindByName(__.key_ref);
            public static readonly Field step_no = FindByName(__.step_no);
            public static readonly Field description = FindByName(__.description);
            public static readonly Field note = FindByName(__.note);
            public static readonly Field group_id = FindByName(__.group_id);
            public static readonly Field person_id = FindByName(__.person_id);
            public static readonly Field approval_status = FindByName(__.approval_status);
            public static readonly Field approval_status_db = FindByName(__.approval_status_db);
            public static readonly Field security_checkpoint_req = FindByName(__.security_checkpoint_req);
            public static readonly Field approval_date = FindByName(__.approval_date);
            public static readonly Field app_person_id = FindByName(__.app_person_id);
            public static readonly Field approval_note = FindByName(__.approval_note);

            public static readonly Field objid = FindByName(__.objid);
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }
        class __
        {
            public const String key_name = "key_name";
            public const String key_ref = "key_ref";
            public const String step_no = "step_no";
            public const String description = "description";
            public const String note = "note";
            public const String group_id = "group_id";
            public const String person_id = "person_id";
            public const String approval_status = "approval_status";
            public const String approval_status_db = "approval_status_db";
            public const String security_checkpoint_req = "security_checkpoint_req";
            public const String approval_date = "approval_date";
            public const String app_person_id = "app_person_id";
            public const String approval_note = "approval_note";

            public const String objid = "objid";
            public const String objversion = "objversion";
        }
        #endregion
    }
    public partial interface Iapproval_routing
    {
        #region 属性
        String key_name { get; set; }
        String key_ref { get; set; }
        Decimal? step_no { get; set; }
        String description { get; set; }
        String note { get; set; }
        String group_id { get; set; }
        String person_id { get; set; }
        String approval_status { get; set; }
        String approval_status_db { get; set; }
        String security_checkpoint_req { get; set; }
        DateTime? approval_date { get; set; }
        String app_person_id { get; set; }
        String approval_note { get; set; }

        String objid { get; set; }
        String objversion { get; set; }
        #endregion

        Object this[String name] { get; set; }
    }

    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("approval_template", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class approval_template : Entity<approval_template>, Iapproval_template
    {
        #region profile_id
        private String _profile_id;
        [DisplayName("审核模板")]
        [Description("ApprovalTemplate.approval_template.ProfileId")]
        [DataObjectField(false, false, false, 20)]
        [BindColumn(1, "profile_id", "", null, "varchar(20)", 0, 0, false)]
        public virtual String profile_id
        {
            get { return _profile_id; }
            set { if (OnPropertyChanging(__.profile_id, value)) { _profile_id = value; OnPropertyChanged(__.profile_id); } }
        }
        #endregion

        #region line_no
        private Decimal? _line_no;
        [DisplayName("行号")]
        [Description("ApprovalTemplate.approval_template.LineNo")]
        [DataObjectField(false, false, false, 5)]
        [BindColumn(2, "line_no", "", null, "decimal(5)", 5, 0, false)]
        public virtual Decimal? line_no
        {
            get { return _line_no; }
            set { if (OnPropertyChanging(__.line_no, value)) { _line_no = value; OnPropertyChanged(__.line_no); } }
        }
        #endregion

        #region step_no
        private Decimal? _step_no;
        [DisplayName("审核步骤")]
        [Description("ApprovalTemplate.approval_template.StepNo")]
        [DataObjectField(false, false, false, 3)]
        [BindColumn(3, "step_no", "", null, "decimal(3)", 3, 0, false)]
        public virtual Decimal? step_no
        {
            get { return _step_no; }
            set { if (OnPropertyChanging(__.step_no, value)) { _step_no = value; OnPropertyChanged(__.step_no); } }
        }
        #endregion

        #region description
        private String _description;
        [DisplayName("步骤描述")]
        [Description("ApprovalTemplate.approval_template.Description")]
        [DataObjectField(false, false, false, 100)]
        [BindColumn(4, "description", "", null, "varchar(100)", 0, 0, false)]
        public virtual String description
        {
            get { return _description; }
            set { if (OnPropertyChanging(__.description, value)) { _description = value; OnPropertyChanged(__.description); } }
        }
        #endregion

        #region group_id
        private String _group_id;
        [DisplayName("审核组")]
        [Description("ApprovalTemplate.approval_template.GroupId")]
        [DataObjectField(false, false, false, 20)]
        [BindColumn(5, "group_id", "", null, "varchar(20)", 0, 0, false)]
        public virtual String group_id
        {
            get { return _group_id; }
            set { if (OnPropertyChanging(__.group_id, value)) { _group_id = value; OnPropertyChanged(__.group_id); } }
        }
        #endregion

        #region person_id
        private String _person_id;
        [DisplayName("审核人员")]
        [Description("ApprovalTemplate.approval_template.PersonId")]
        [DataObjectField(false, false, false, 35)]
        [BindColumn(6, "person_id", "", null, "varchar(35)", 0, 0, false)]
        public virtual String person_id
        {
            get { return _person_id; }
            set { if (OnPropertyChanging(__.person_id, value)) { _person_id = value; OnPropertyChanged(__.person_id); } }
        }
        #endregion

        #region security_checkpoint_req
        private String _security_checkpoint_req;
        [DisplayName("检查标识")]
        [Description("ApprovalTemplate.approval_template.SecurityCheckpointReq")]
        [DataObjectField(false, false, false, 5)]
        [BindColumn(7, "security_checkpoint_req", "", null, "varchar(5)", 0, 0, false)]
        public virtual String security_checkpoint_req
        {
            get { return _security_checkpoint_req; }
            set { if (OnPropertyChanging(__.security_checkpoint_req, value)) { _security_checkpoint_req = value; OnPropertyChanged(__.security_checkpoint_req); } }
        }
        #endregion


        #region _objid
        private String _objid;
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(9, "objid", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objid
        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }
        #endregion

        #region _objversion
        private String _objversion;
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(10, "objversion", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objversion
        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.profile_id: return _profile_id;
                    case __.line_no: return _line_no;
                    case __.step_no: return _step_no;
                    case __.description: return _description;
                    case __.group_id: return _group_id;
                    case __.person_id: return _person_id;
                    case __.security_checkpoint_req: return _security_checkpoint_req;

                    case __.objid: return _objid;
                    case __.objversion: return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.profile_id:
                        if (value != null)
                            _profile_id = Convert.ToString(value);
                        else
                            _profile_id = null;
                        break;
                    case __.line_no:
                        if (value != null)
                            _line_no = Convert.ToDecimal(value);
                        else
                            _line_no = null;
                        break;
                    case __.step_no:
                        if (value != null)
                            _step_no = Convert.ToDecimal(value);
                        else
                            _step_no = null;
                        break;
                    case __.description:
                        if (value != null)
                            _description = Convert.ToString(value);
                        else
                            _description = null;
                        break;
                    case __.group_id:
                        if (value != null)
                            _group_id = Convert.ToString(value);
                        else
                            _group_id = null;
                        break;
                    case __.person_id:
                        if (value != null)
                            _person_id = Convert.ToString(value);
                        else
                            _person_id = null;
                        break;
                    case __.security_checkpoint_req:
                        if (value != null)
                            _security_checkpoint_req = Convert.ToString(value);
                        else
                            _security_checkpoint_req = null;
                        break;


                    case __.objid:
                        if (value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                        break;
                    case __.objversion:
                        if (value != null)
                            _objversion = Convert.ToString(value);
                        else
                            _objversion = null;
                        break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        public class _
        {
            public static readonly Field profile_id = FindByName(__.profile_id);
            public static readonly Field line_no = FindByName(__.line_no);
            public static readonly Field step_no = FindByName(__.step_no);
            public static readonly Field description = FindByName(__.description);
            public static readonly Field group_id = FindByName(__.group_id);
            public static readonly Field person_id = FindByName(__.person_id);
            public static readonly Field security_checkpoint_req = FindByName(__.security_checkpoint_req);

            public static readonly Field objid = FindByName(__.objid);
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }
        class __
        {
            public const String profile_id = "profile_id";
            public const String line_no = "line_no";
            public const String step_no = "step_no";
            public const String description = "description";
            public const String group_id = "group_id";
            public const String person_id = "person_id";
            public const String security_checkpoint_req = "security_checkpoint_req";

            public const String objid = "objid";
            public const String objversion = "objversion";
        }
        #endregion
    }
    public partial interface Iapproval_template
    {
        #region 属性
        String profile_id { get; set; }
        Decimal? line_no { get; set; }
        Decimal? step_no { get; set; }
        String description { get; set; }
        String group_id { get; set; }
        String person_id { get; set; }
        String security_checkpoint_req { get; set; }

        String objid { get; set; }
        String objversion { get; set; }
        #endregion

        Object this[String name] { get; set; }
    }

    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("person_group", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class person_group : Entity<person_group>, Iperson_group
    {
        #region group_id
        private String _group_id;
        [DisplayName("组代码")]
        [Description("PersonGroup.person_group.GroupId")]
        [DataObjectField(false, false, false, 20)]
        [BindColumn(1, "group_id", "", null, "varchar(20)", 0, 0, false)]
        public virtual String group_id
        {
            get { return _group_id; }
            set { if (OnPropertyChanging(__.group_id, value)) { _group_id = value; OnPropertyChanged(__.group_id); } }
        }
        #endregion

        #region group_description
        private String _group_description;
        [DisplayName("组描述")]
        [Description("PersonGroup.person_group.GroupDescription")]
        [DataObjectField(false, false, false, 100)]
        [BindColumn(2, "group_description", "", null, "varchar(100)", 0, 0, false)]
        public virtual String group_description
        {
            get { return _group_description; }
            set { if (OnPropertyChanging(__.group_description, value)) { _group_description = value; OnPropertyChanged(__.group_description); } }
        }
        #endregion


        #region _objid
        private String _objid;
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(9, "objid", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objid
        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }
        #endregion

        #region _objversion
        private String _objversion;
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(10, "objversion", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objversion
        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.group_id: return _group_id;
                    case __.group_description: return _group_description;

                    case __.objid: return _objid;
                    case __.objversion: return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.group_id:
                        if (value != null)
                            _group_id = Convert.ToString(value);
                        else
                            _group_id = null;
                        break;
                    case __.group_description:
                        if (value != null)
                            _group_description = Convert.ToString(value);
                        else
                            _group_description = null;
                        break;


                    case __.objid:
                        if (value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                        break;
                    case __.objversion:
                        if (value != null)
                            _objversion = Convert.ToString(value);
                        else
                            _objversion = null;
                        break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        public class _
        {
            public static readonly Field group_id = FindByName(__.group_id);
            public static readonly Field group_description = FindByName(__.group_description);

            public static readonly Field objid = FindByName(__.objid);
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }
        class __
        {
            public const String group_id = "group_id";
            public const String group_description = "group_description";

            public const String objid = "objid";
            public const String objversion = "objversion";
        }
        #endregion
    }
    public partial interface Iperson_group
    {
        #region 属性
        String group_id { get; set; }
        String group_description { get; set; }

        String objid { get; set; }
        String objversion { get; set; }
        #endregion

        Object this[String name] { get; set; }
    }

    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("person_group_members", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class person_group_members : Entity<person_group_members>, Iperson_group_members
    {
        #region group_id
        private String _group_id;
        [DisplayName("组代码")]
        [Description("PersonGroupMembers.person_group_members.GroupId")]
        [DataObjectField(false, false, false, 20)]
        [BindColumn(1, "group_id", "", null, "varchar(20)", 0, 0, false)]
        public virtual String group_id
        {
            get { return _group_id; }
            set { if (OnPropertyChanging(__.group_id, value)) { _group_id = value; OnPropertyChanged(__.group_id); } }
        }
        #endregion

        #region person_id
        private String _person_id;
        [DisplayName("人员ID")]
        [Description("PersonGroupMembers.person_group_members.PersonId")]
        [DataObjectField(false, false, false, 35)]
        [BindColumn(2, "person_id", "", null, "varchar(35)", 0, 0, false)]
        public virtual String person_id
        {
            get { return _person_id; }
            set { if (OnPropertyChanging(__.person_id, value)) { _person_id = value; OnPropertyChanged(__.person_id); } }
        }
        #endregion

        #region note
        private String _note;
        [DisplayName("备注")]
        [Description("PersonGroupMembers.person_group_members.Note")]
        [DataObjectField(false, false, false, 2000)]
        [BindColumn(3, "note", "", null, "varchar(2000)", 0, 0, false)]
        public virtual String note
        {
            get { return _note; }
            set { if (OnPropertyChanging(__.note, value)) { _note = value; OnPropertyChanged(__.note); } }
        }
        #endregion

        #region valid_from_date
        private DateTime? _valid_from_date;
        [DisplayName("开始日期")]
        [Description("PersonGroupMembers.person_group_members.ValidFromDate")]
        [DataObjectField(false, false, false, 0)]
        [BindColumn(4, "valid_from_date", "", null, "date", 0, 0, false)]
        public virtual DateTime? valid_from_date
        {
            get { return _valid_from_date; }
            set { if (OnPropertyChanging(__.valid_from_date, value)) { _valid_from_date = value; OnPropertyChanged(__.valid_from_date); } }
        }
        #endregion

        #region valid_to_date
        private DateTime? _valid_to_date;
        [DisplayName("截止日期")]
        [Description("PersonGroupMembers.person_group_members.ValidToDate")]
        [DataObjectField(false, false, false, 0)]
        [BindColumn(5, "valid_to_date", "", null, "date", 0, 0, false)]
        public virtual DateTime? valid_to_date
        {
            get { return _valid_to_date; }
            set { if (OnPropertyChanging(__.valid_to_date, value)) { _valid_to_date = value; OnPropertyChanged(__.valid_to_date); } }
        }
        #endregion


        #region _objid
        private String _objid;
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(9, "objid", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objid
        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }
        #endregion

        #region _objversion
        private String _objversion;
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(10, "objversion", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objversion
        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.group_id: return _group_id;
                    case __.person_id: return _person_id;
                    case __.note: return _note;
                    case __.valid_from_date: return _valid_from_date;
                    case __.valid_to_date: return _valid_to_date;

                    case __.objid: return _objid;
                    case __.objversion: return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.group_id:
                        if (value != null)
                            _group_id = Convert.ToString(value);
                        else
                            _group_id = null;
                        break;
                    case __.person_id:
                        if (value != null)
                            _person_id = Convert.ToString(value);
                        else
                            _person_id = null;
                        break;
                    case __.note:
                        if (value != null)
                            _note = Convert.ToString(value);
                        else
                            _note = null;
                        break;
                    case __.valid_from_date:
                        if (value != null)
                            _valid_from_date = Convert.ToDateTime(value);
                        else
                            _valid_from_date = null;
                        break;
                    case __.valid_to_date:
                        if (value != null)
                            _valid_to_date = Convert.ToDateTime(value);
                        else
                            _valid_to_date = null;
                        break;


                    case __.objid:
                        if (value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                        break;
                    case __.objversion:
                        if (value != null)
                            _objversion = Convert.ToString(value);
                        else
                            _objversion = null;
                        break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        public class _
        {
            public static readonly Field group_id = FindByName(__.group_id);
            public static readonly Field person_id = FindByName(__.person_id);
            public static readonly Field note = FindByName(__.note);
            public static readonly Field valid_from_date = FindByName(__.valid_from_date);
            public static readonly Field valid_to_date = FindByName(__.valid_to_date);

            public static readonly Field objid = FindByName(__.objid);
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }
        class __
        {
            public const String group_id = "group_id";
            public const String person_id = "person_id";
            public const String note = "note";
            public const String valid_from_date = "valid_from_date";
            public const String valid_to_date = "valid_to_date";

            public const String objid = "objid";
            public const String objversion = "objversion";
        }
        #endregion
    }
    public partial interface Iperson_group_members
    {
        #region 属性
        String group_id { get; set; }
        String person_id { get; set; }
        String note { get; set; }
        DateTime? valid_from_date { get; set; }
        DateTime? valid_to_date { get; set; }

        String objid { get; set; }
        String objversion { get; set; }
        #endregion

        Object this[String name] { get; set; }
    }

    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("person_info", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class person_info : Entity<person_info>, Iperson_info
    {
        #region person_id
        private String _person_id;
        [DisplayName("人员ID")]
        [Description("PersonInfo.person_info.PersonId")]
        [DataObjectField(false, false, false, 40)]
        [BindColumn(1, "person_id", "", null, "varchar(40)", 0, 0, false)]
        public virtual String person_id
        {
            get { return _person_id; }
            set { if (OnPropertyChanging(__.person_id, value)) { _person_id = value; OnPropertyChanged(__.person_id); } }
        }
        #endregion

        #region creation_date
        private DateTime? _creation_date;
        [DisplayName("创建日期")]
        [Description("PersonInfo.person_info.CreationDate")]
        [DataObjectField(false, false, false, 7)]
        [BindColumn(2, "creation_date", "", null, "date", 0, 0, false)]
        public virtual DateTime? creation_date
        {
            get { return _creation_date; }
            set { if (OnPropertyChanging(__.creation_date, value)) { _creation_date = value; OnPropertyChanged(__.creation_date); } }
        }
        #endregion

        #region picture_id
        private Decimal? _picture_id;
        [DisplayName("图片")]
        [Description("PersonInfo.person_info.PictureId")]
        [DataObjectField(false, false, false, 22)]
        [BindColumn(3, "picture_id", "", null, "decimal(22)", 5, 0, false)]
        public virtual Decimal? picture_id
        {
            get { return _picture_id; }
            set { if (OnPropertyChanging(__.picture_id, value)) { _picture_id = value; OnPropertyChanged(__.picture_id); } }
        }
        #endregion

        #region country
        private String _country;
        [DisplayName("国家")]
        [Description("PersonInfo.person_info.Country")]
        [DataObjectField(false, false, false, 2000)]
        [BindColumn(4, "country", "", null, "varchar(2000)", 0, 0, false)]
        public virtual String country
        {
            get { return _country; }
            set { if (OnPropertyChanging(__.country, value)) { _country = value; OnPropertyChanged(__.country); } }
        }
        #endregion

        #region party_type
        private String _party_type;
        [DisplayName("类型")]
        [Description("PersonInfo.person_info.PartyType")]
        [DataObjectField(false, false, false, 2000)]
        [BindColumn(5, "party_type", "", null, "varchar(2000)", 0, 0, false)]
        public virtual String party_type
        {
            get { return _party_type; }
            set { if (OnPropertyChanging(__.party_type, value)) { _party_type = value; OnPropertyChanged(__.party_type); } }
        }
        #endregion

        #region user_id
        private String _user_id;
        [DisplayName("用户ID")]
        [Description("PersonInfo.person_info.UserId")]
        [DataObjectField(false, false, false, 120)]
        [BindColumn(6, "user_id", "", null, "varchar(120)", 0, 0, false)]
        public virtual String user_id
        {
            get { return _user_id; }
            set { if (OnPropertyChanging(__.user_id, value)) { _user_id = value; OnPropertyChanged(__.user_id); } }
        }
        #endregion

        #region picture_thumbnail_id
        private Decimal? _picture_thumbnail_id;
        [DisplayName("缩略图")]
        [Description("PersonInfo.person_info.PictureThumbnailId")]
        [DataObjectField(false, false, false, 22)]
        [BindColumn(7, "picture_thumbnail_id", "", null, "decimal(22)", 5, 0, false)]
        public virtual Decimal? picture_thumbnail_id
        {
            get { return _picture_thumbnail_id; }
            set { if (OnPropertyChanging(__.picture_thumbnail_id, value)) { _picture_thumbnail_id = value; OnPropertyChanged(__.picture_thumbnail_id); } }
        }
        #endregion

        #region inactive
        private String _inactive;
        [DisplayName("激活")]
        [Description("PersonInfo.person_info.Inactive")]
        [DataObjectField(false, false, false, 20)]
        [BindColumn(8, "inactive", "", null, "varchar(20)", 0, 0, false)]
        public virtual String inactive
        {
            get { return _inactive; }
            set { if (OnPropertyChanging(__.inactive, value)) { _inactive = value; OnPropertyChanged(__.inactive); } }
        }
        #endregion

        #region person_name
        private String _person_name;
        [DisplayName("姓名")]
        [Description("PersonInfo.person_info.PersonName")]
        [DataObjectField(false, false, false, 100)]
        [BindColumn(9, "person_name", "", null, "varchar(100)", 0, 0, false)]
        public virtual String person_name
        {
            get { return _person_name; }
            set { if (OnPropertyChanging(__.person_name, value)) { _person_name = value; OnPropertyChanged(__.person_name); } }
        }
        #endregion


        #region _objid
        private String _objid;
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(9, "objid", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objid
        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }
        #endregion

        #region _objversion
        private String _objversion;
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(10, "objversion", "", null, "varchar(50)", 0, 0, false)]
        public virtual String objversion
        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.person_id: return _person_id;
                    case __.creation_date: return _creation_date;
                    case __.picture_id: return _picture_id;
                    case __.country: return _country;
                    case __.party_type: return _party_type;
                    case __.user_id: return _user_id;
                    case __.picture_thumbnail_id: return _picture_thumbnail_id;
                    case __.inactive: return _inactive;
                    case __.person_name: return _person_name;

                    case __.objid: return _objid;
                    case __.objversion: return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.person_id:
                        if (value != null)
                            _person_id = Convert.ToString(value);
                        else
                            _person_id = null;
                        break;
                    case __.creation_date:
                        if (value != null)
                            _creation_date = Convert.ToDateTime(value);
                        else
                            _creation_date = null;
                        break;
                    case __.picture_id:
                        if (value != null)
                            _picture_id = Convert.ToDecimal(value);
                        else
                            _picture_id = null;
                        break;
                    case __.country:
                        if (value != null)
                            _country = Convert.ToString(value);
                        else
                            _country = null;
                        break;
                    case __.party_type:
                        if (value != null)
                            _party_type = Convert.ToString(value);
                        else
                            _party_type = null;
                        break;
                    case __.user_id:
                        if (value != null)
                            _user_id = Convert.ToString(value);
                        else
                            _user_id = null;
                        break;
                    case __.picture_thumbnail_id:
                        if (value != null)
                            _picture_thumbnail_id = Convert.ToDecimal(value);
                        else
                            _picture_thumbnail_id = null;
                        break;
                    case __.inactive:
                        if (value != null)
                            _inactive = Convert.ToString(value);
                        else
                            _inactive = null;
                        break;
                    case __.person_name:
                        if (value != null)
                            _person_name = Convert.ToString(value);
                        else
                            _person_name = null;
                        break;


                    case __.objid:
                        if (value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                        break;
                    case __.objversion:
                        if (value != null)
                            _objversion = Convert.ToString(value);
                        else
                            _objversion = null;
                        break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        public class _
        {
            public static readonly Field person_id = FindByName(__.person_id);
            public static readonly Field creation_date = FindByName(__.creation_date);
            public static readonly Field picture_id = FindByName(__.picture_id);
            public static readonly Field country = FindByName(__.country);
            public static readonly Field party_type = FindByName(__.party_type);
            public static readonly Field user_id = FindByName(__.user_id);
            public static readonly Field picture_thumbnail_id = FindByName(__.picture_thumbnail_id);
            public static readonly Field inactive = FindByName(__.inactive);
            public static readonly Field person_name = FindByName(__.person_name);

            public static readonly Field objid = FindByName(__.objid);
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }
        class __
        {
            public const String person_id = "person_id";
            public const String creation_date = "creation_date";
            public const String picture_id = "picture_id";
            public const String country = "country";
            public const String party_type = "party_type";
            public const String user_id = "user_id";
            public const String picture_thumbnail_id = "picture_thumbnail_id";
            public const String inactive = "inactive";
            public const String person_name = "person_name";

            public const String objid = "objid";
            public const String objversion = "objversion";
        }
        #endregion
    }
    public partial interface Iperson_info
    {
        #region 属性
        String person_id { get; set; }
        DateTime? creation_date { get; set; }
        Decimal? picture_id { get; set; }
        String country { get; set; }
        String party_type { get; set; }
        String user_id { get; set; }
        Decimal? picture_thumbnail_id { get; set; }
        String inactive { get; set; }
        String person_name { get; set; }

        String objid { get; set; }
        String objversion { get; set; }
        #endregion

        Object this[String name] { get; set; }
    }
}
